{% extends 'base_backend.html' %}
{% load static %}

{% block header_tail %}
<link rel="stylesheet" href="{% static 'public/CodeMirror/lib/codemirror.css' %}">
<link rel="stylesheet" href="{% static 'public/CodeMirror/theme/lesser-dark.css' %}">
<link rel="stylesheet" href="{% static 'public/html5shiv/css/jquery.slinky.css' %}">
<style>
    .debug-radio {
        width: 16px;
        height: 16px;
        vertical-align: text-bottom;
    }

    #menu ul {
        padding: 0;
        height: 100%;
        /* background-color: #aaa */
    }

    .menu-num {
        float: right;
        cursor: pointer;
        margin-right: 20px;
    }

    .menu-title {
        margin-left: 20%;
    }

    .menu-back {
        border-bottom: solid 1px cadetblue;
    }

    .menu-back-a {
        color: #00acd6;
        cursor: pointer;
    }

    .text-error {
        color: red;
    }

    .menu-urls-num {
        float: right;
        margin-right: 30px;
    }
</style>
{% endblock header_tail %}

{% block section_content %}
<div class="row" style="height: 100%">
    <!-- code -->
    <section id="codeSection" class="col-md-6 connectedSortable">
        <div class="box box-success">
            <div class="box-header with-border">
                <h3 class="box-title">修改前</h3>
            </div>
            <div class="box-body">
                <div class="form-group">
                    <label>siteName</label>
                    <input type="text" class="form-control" disabled value="{{ result_pre.siteName }}">
                </div>
                <div class="form-group">
                    <label>channel</label>
                    <input type="text" class="form-control" disabled value="{{ result_pre.channel }}">
                </div>
                <div class="form-group">
                    <label>title</label>
                    <input type="text" class="form-control" disabled value="{{ result_pre.title }}">
                </div>
                <div class="form-group">
                    <label>ctime</label>
                    <input type="text" class="form-control" disabled value="{{ result_pre.ctime }}">
                </div>
                <div class="form-group">
                    <label>source</label>
                    <input type="text" class="form-control" disabled value="{{ result_pre.source }}">
                </div>
                <div class="form-group">
                    <label>retweeted_source</label>
                    <input type="text" class="form-control" disabled value="{{ result_pre.retweeted_source }}">
                </div>
                <div class="form-group">
                    <label>retweeted_status_url</label>
                    <input type="text" class="form-control" disabled value="{{ result_pre.retweeted_status_url }}">
                </div>
                <div class="form-group">
                    <label>content</label>
                    <textarea class="form-control" readonly="readonly">{{ result_pre.content }}</textarea>
                </div>
                <div class="form-group">
                    <label>content_xml</label>
                    <textarea class="form-control" readonly="readonly">{{ result_pre.content_xml }}</textarea>
                </div>
                <div class="form-group">
                    <label>pic_urls</label>
                    <textarea class="form-control" readonly="readonly">{{ result_pre.pic_urls }}</textarea>
                </div>
            </div>
<!--            <div class="box-footer">-->
<!--                <div class="form-group">-->
<!--                    <input type="radio" name="proxy" value="0" class="debug-radio" checked>不使用-->
<!--                    <input type="radio" name="proxy" value="1" class="debug-radio">使用-->
<!--                </div>-->
<!--            </div>-->
        </div>
    </section>
    <!-- result -->
    <section id="resultSection" class="col-md-6 connectedSortable">
        <div class="box box-primary">
            <div class="box-header with-border">
                <h3 class="box-title">修改后</h3>
            </div>
            <div class="box-body">
                <div class="form-group">
                    {% if result_post.siteName != result_pre.siteName %}
                    <label style="color: red">siteName</label>
                    {% else %}
                    <label>siteName</label>
                    {% endif %}
                    <input type="text" class="form-control" disabled value="{{ result_post.siteName }}">
                </div>
                <div class="form-group">
                    {% if result_post.channel != result_pre.channel %}
                    <label style="color: red">channel</label>
                    {% else %}
                    <label>channel</label>
                    {% endif %}
                    <input type="text" class="form-control" disabled value="{{ result_post.channel }}">
                </div>
                <div class="form-group">
                    {% if result_post.title != result_pre.title %}
                    <label style="color: red">title</label>
                    {% else %}
                    <label>title</label>
                    {% endif %}
                    <input type="text" class="form-control" disabled value="{{ result_post.title }}">
                </div>
                <div class="form-group">
                    {% if result_post.ctime != result_pre.ctime %}
                    <label style="color: red">ctime</label>
                    {% else %}
                    <label>ctime</label>
                    {% endif %}
                    <input type="text" class="form-control" disabled value="{{ result_post.ctime }}">
                </div>
                <div class="form-group">
                    {% if result_post.source != result_pre.source %}
                    <label style="color: red">source</label>
                    {% else %}
                    <label>source</label>
                    {% endif %}
                    <input type="text" class="form-control" disabled value="{{ result_post.source }}">
                </div>
                <div class="form-group">
                    {% if result_post.retweeted_source != result_pre.retweeted_source %}
                    <label style="color: red">retweeted_source</label>
                    {% else %}
                    <label>retweeted_source</label>
                    {% endif %}
                    <input type="text" class="form-control" disabled value="{{ result_post.retweeted_source }}">
                </div>
                <div class="form-group">
                    {% if result_post.retweeted_status_url != result_pre.retweeted_status_url %}
                    <label style="color: red">retweeted_status_url</label>
                    {% else %}
                    <label>retweeted_status_url</label>
                    {% endif %}
                    <input type="text" class="form-control" disabled value="{{ result_post.retweeted_status_url }}">
                </div>
                <div class="form-group">
                    {% if result_post.content != result_pre.content %}
                    <label style="color: red">content</label>
                    {% else %}
                    <label>content</label>
                    {% endif %}
                    <textarea class="form-control" readonly="readonly">{{ result_post.content }}</textarea>
                </div>
                <div class="form-group">
                    {% if result_post.content_xml != result_pre.content_xml %}
                    <label style="color: red">content_xml</label>
                    {% else %}
                    <label>content_xml</label>
                    {% endif %}
                    <textarea class="form-control" readonly="readonly">{{ result_post.content_xml }}</textarea>
                </div>
                <div class="form-group">
                    {% if result_post.pic_urls != result_pre.pic_urls %}
                    <label style="color: red">pic_urls</label>
                    {% else %}
                    <label>pic_urls</label>
                    {% endif %}
                    <textarea class="form-control" readonly="readonly">{{ result_post.pic_urls }}</textarea>
                </div>
            </div>
        </div>
</div>
</section>
</div>
<!-- 自定义字段的展示，需要使用过滤器-->
{% endblock section_content %}
